/**
 * Created by luoqifei on 17-2-21.
 */
public class Te {
    public static void main(String args[]){
        String oldRowKey = "pName1_pType1";
        System.out.println(oldRowKey.indexOf("_"));
        System.out.println(oldRowKey.lastIndexOf("_"));
        //old row key is pName_pType_runDate,new key is  pName_pType
        String newRowKey = oldRowKey.substring(0,oldRowKey.lastIndexOf("_"));
        System.out.println(newRowKey);
    }
}
